package com.learn.threadpool;

import com.learn.Util.TimeUtils;
import com.learn.constant.MathConstant;

/**
 * 测试线程
 */
public class MyThread implements Runnable {

    public int index;

    public MyThread (int index) {
        this.index = index;
    }

    @Override
    public void run() {
        System.out.println(TimeUtils.getDateStr() + " Thread-" + Thread.currentThread().getName() + "  " + index);
        try {
            Thread.sleep(MathConstant.INT_1000);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
